package com.qf.controller;

import com.qf.pojo.BaseResp;
import com.qf.service.MvSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/search")
public class MvSearchController {
    @Autowired
    MvSearchService mvSearchService;
    @RequestMapping("/findAll/{key}")
    public BaseResp findAllBykey(@PathVariable("key") String key ){
        return mvSearchService.findAllBykey(key);
    }
    @RequestMapping("/findAll")
    public BaseResp findAllBykey(){
        return mvSearchService.findAllBykey(null);
    }
}
